<template>
  <div class="home_box">
    <div class="col_box">欢迎，{{ name }}来到某某学院快捷校园在线互助系统</div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      name: "",
    };
  },
  created() {
    this.isLogin();
  },
  mounted() {},
  methods: {
    isLogin() {
      if (window.localStorage.getItem("role") != "管理员") {
        this.$message.error("你还没有权限，请切换帐号！");
        return;
      }
      this.name = window.localStorage.getItem("userName");
    },
  },
};
</script>
<style lang="less" scoped>
.home_box {
  height: 100%;
  position: relative;
  .col_box {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    color: #313133;
  }
}
</style>
